package com.codeduck.kafka.kafka.producer;

import com.codeduck.kafka.exception.MessageException;

/**
 * @author: <a href="mailto:codeduck@163.com">Codeduck</a>
 * @date: 2023/3/1
 */
public interface IMessageProducer {

    /**
     * 发送消息到Topic
     */
    public void sendMessage(String message, String topic) throws MessageException;

    /**
     * 发送消息到指定的分区
     */
    public void sendMessage(String message, String topic, int partition) throws MessageException;
}
